<template>
	<view class="mission">
		<nav-header title="任务" showback="true" navBackcolor="transparent"></nav-header>
		<view class="mission-banner">
			<image class="mission-banner-bg" src="../../../static/img/index/mission/bg1.png"
				style="height: 322rpx;width: 686rpx;" mode="">
			</image>
			<view class="mission-banner-header u-flex u-row-between">
				<view class="mission-banner-header-left u-flex" @click="$Router.push('/pages/index/mission/candy-mine')">
					<view class="" style="margin-right:8rpx">
						全部喜糖
					</view>
					<image src="../../../static/img/index/mission/warm.png" style="width: 32rpx;height: 32rpx;" mode="">
					</image>
				</view>
				<view class="mission-banner-header-right u-flex"
					@click="$Router.push('/pages/index/mission/candy-loss')">
					<view class="" style="margin-right:8rpx">
						喜糖明细
					</view>
					<image src="../../../static/img/index/mission/chevron-right.png" style="width: 32rpx;height: 32rpx;"
						mode=""></image>
				</view>
			</view>
			<view class="mission-banner-main">
				<view class="mission-banner-main-num">
					2151
				</view>
				<image src="../../../static/img/index/mission/gold-row.png" style="height: 2rpx;622rpx" mode=""></image>
				<view class="mission-banner-main-flex u-flex">
					<view class="mission-banner-main-flex-item">
						<view class="mission-banner-main-flex-item-title" style="color: #FFFCE5;">
							免费获得
						</view>
						<view class="mission-banner-main-flex-item-value" style="font-size: 24rpx;color: #FFF7B3;">
							1036
						</view>
					</view>
					<image src="../../../static/img/index/mission/gold-col.png" style="width: 2rpx;height: 60rpx;"
						mode=""></image>
					<view class="mission-banner-main-flex-item">
						<view class="mission-banner-main-flex-item-title" style="color: #FFFCE5;">
							付费充值
						</view>
						<view class="mission-banner-main-flex-item-value" style="font-size: 24rpx;color: #FFF7B3;">
							1036
						</view>
					</view>
					<image src="../../../static/img/index/mission/gold-col.png" style="width: 2rpx;height: 60rpx;"
						mode=""></image>
					<view class="mission-banner-main-flex-item">
						<view class="mission-banner-main-flex-item-title" style="color: #FFFCE5;">
							任务奖励
						</view>
						<view class="mission-banner-main-flex-item-value" style="font-size: 24rpx;color: #FFF7B3;">
							1036
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="mission-use">
			<view class="mission-use-title">
				喜糖用途
			</view>
			<view class="mission-use-main u-flex">
				<view class="mission-use-main-item">
					<image src="../../../static/img/index/mission/candy-use1.png" mode=""></image>
					<view class="">
						申请认识
					</view>
				</view>
				<view class="mission-use-main-item">
					<image src="../../../static/img/index/mission/candy-use2.png" mode=""></image>
					<view class="">
						CP盲盒
					</view>
				</view>
				<view class="mission-use-main-item">
					<image src="../../../static/img/index/mission/candy-use3.png" mode=""></image>
					<view class="">
						上推荐墙
					</view>
				</view>
				<view class="mission-use-main-item">
					<image src="../../../static/img/index/mission/candy-use4.png" mode=""></image>
					<view class="">
						解锁访客
					</view>
				</view>
				<view class="mission-use-main-item">
					<image src="../../../static/img/index/mission/candy-use5.png" mode=""></image>
					<view class="">
						解锁粉丝
					</view>
				</view>
			</view>
		</view>
		<view class="mission-candy">
			<image src="../../../static/img/index/mission/bg2.png" class="mission-candy-bg"
				style="height: 148rpx;width: 686rpx;" mode="">
			</image>
			<view class="mission-candy-main u-flex u-row-between">
				<view class="mission-candy-main-left">
					<view class="mission-candy-main-left-title">
						获取喜糖
					</view>
					<view class="mission-candy-main-left-dsc u-flex">
						<view class="">
							获取喜糖遇到困难？联系客服
						</view>
						<image style="height: 32rpx;width: 32rpx;"
							src="../../../static/img/index/mission/chevron-right.png" mode=""></image>
					</view>
				</view>
				<view class="mission-candy-main-right">
					<view class="mission-candy-main-right-btn">
						立即进入
					</view>
				</view>
			</view>
		</view>
		<view class="mission-sign shadow-box">
			<view class="mission-sign-title">
				签到
			</view>
			<view class="mission-sign-header u-flex">
				<view class="mission-sign-header-left">
					<image src="../../../static/img/index/mission/mission-icon1.png" mode=""></image>
				</view>
				<view class="mission-sign-header-main">
					<view class="" style="font-size: 32rpx;font-weight: bold;">
						签到领奖励
					</view>
					<view class="" style="font-size: 24rpx;">
						已连续签到<span style="color: #FC2B4CFF;">2</span>天
					</view>
				</view>
				<view class="mission-sign-header-right">
					<view class="public-btn public-btn-color">
						签到
					</view>
				</view>
			</view>
			<view class="mission-sign-main u-flex">
				<view class="mission-sign-main-item mission-sign-main-down">
					<view class="mission-sign-main-item-top">
						<image src="../../../static/img/index/mission/sign-check.png" mode=""></image>
					</view>
					<view class="mission-sign-main-item-down">
						已签
					</view>
				</view>
				<view class="mission-sign-main-item mission-sign-main-gift">
					<view class="mission-sign-main-item-top">
						<image src="../../../static/img/index/mission/gift.png" style="width: 40rpx;height: 40rpx;"
							mode=""></image>
					</view>
					<view class="mission-sign-main-item-down">
						今天
					</view>
				</view>
				<view class="mission-sign-main-item mission-sign-main-plus" v-for="(item,index) in [1,1,1,1,1]">
					<view class="mission-sign-main-item-top">
						+5
					</view>
					<view class="mission-sign-main-item-down">
						4天
					</view>
				</view>
			</view>
		</view>
		<view class="mission-main">
			<view class="mission-main-box shadow-box">
				<view class="mission-main-box-title">
					每日任务
				</view>
				<index-missionitem title="每日签到" point="50" type="1"
					icon="../../static/img/index/mission/mission-icon1.png"></index-missionitem>
				<index-missionitem title="发布一条动态" point="50" type="0"
					icon="../../static/img/index/mission/mission-icon2.png"></index-missionitem>
				<index-missionitem title="给TA人动态点赞" point="50" type="2"
					icon="../../static/img/index/mission/mission-icon3.png"></index-missionitem>
				<index-missionitem title="给TA人动态评论" point="50" type="1"
					icon="../../static/img/index/mission/mission-icon4.png"></index-missionitem>
				<index-missionitem title="开启一次CP盲盒" point="50" type="0"
					icon="../../static/img/index/mission/mission-icon8.png"></index-missionitem>
				<index-missionitem title="给TA人颜值打分 0/10" point="50" type="1"
					icon="../../static/img/index/mission/mission-icon5.png"></index-missionitem>
			</view>
			<view class="mission-main-box shadow-box">
				<view class="mission-main-box-title">
					认证任务
				</view>
				<index-missionitem title="完成基础资料" point="50" type="0"
					icon="../../static/img/index/mission/mission-icon9.png"></index-missionitem>
				<index-missionitem title="完成实名认证" point="50" type="2"
					icon="../../static/img/index/mission/mission-icon6.png"></index-missionitem>
				<index-missionitem title="完成工作认证" point="50" type="1"
					icon="../../static/img/index/mission/mission-icon10.png"></index-missionitem>
				<index-missionitem title="完成学历认证" point="50" type="0"
					icon="../../static/img/index/mission/mission-icon7.png"></index-missionitem>
				<index-missionitem title="完成房产认证" point="50" type="1"
					icon="../../static/img/index/mission/mission-icon12.png"></index-missionitem>
				<index-missionitem title="完成车辆认证" point="50" type="2"
					icon="../../static/img/index/mission/mission-icon13.png"></index-missionitem>
				<index-missionitem title="完成亲友认证" point="50" type="2"
					icon="../../static/img/index/mission/mission-icon11.png"></index-missionitem>
			</view>
		</view>
	</view>
</template>

<script>
	//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
	import navHeader from '../../../components/nav-header/nav-header.vue'
	import indexMissionitem from '../../../components/index-missionitem/index-missionitem.vue'
	export default {
		// 组件名称
		name: 'demo',
		// 组件参数 接收来自父组件的数据
		props: {},
		// 局部注册的组件,import引入的组件需要注入到对象中才能使用
		components: {
			navHeader,
			indexMissionitem
		},
		// 组件状态值
		data() {
			return {}
		},
		// 计算属性
		computed: {},
		// 侦听器
		watch: {},
		// 组件方法
		methods: {},
		// 以下是生命周期钩子   注：没用到的钩子请自行删除
		/**
		 * 在实例初始化之后，组件属性计算之前，如data属性等
		 */
		beforeCreate() {},
		/**
		 * 组件实例创建完成，属性已绑定，但DOM还未生成，$ el属性还不存在
		 */
		created() {},
		/**
		 * 在挂载开始之前被调用：相关的 render 函数首次被调用。
		 */
		beforeMount() {},
		/**
		 * el 被新创建的 vm.$ el 替换，并挂载到实例上去之后调用该钩子。
		 * 如果 root 实例挂载了一个文档内元素，当 mounted 被调用时 vm.$ el 也在文档内。
		 */
		mounted() {},
		/**
		 * 数据更新时调用，发生在虚拟 DOM 重新渲染和打补丁之前。
		 * 你可以在这个钩子中进一步地更改状态，这不会触发附加的重渲染过程。
		 */
		beforeUpdate() {},
		/**
		 * 由于数据更改导致的虚拟 DOM 重新渲染和打补丁，在这之后会调用该钩子。
		 * 当这个钩子被调用时，组件 DOM 已经更新，所以你现在可以执行依赖于 DOM 的操作。
		 */
		updated() {},
		/**
		 * keep-alive 组件激活时调用。 仅针对keep-alive 组件有效
		 */
		activated() {},
		/**
		 * keep-alive 组件停用时调用。 仅针对keep-alive 组件有效
		 */
		deactivated() {},
		/**
		 * 实例销毁之前调用。在这一步，实例仍然完全可用。
		 */
		beforeDestroy() {},
		/**
		 * Vue 实例销毁后调用。调用后，Vue 实例指示的所有东西都会解绑定，
		 * 所有的事件监听器会被移除，所有的子实例也会被销毁。
		 */
		destroyed() {}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<!--使用了scoped属性之后，父组件的style样式将不会渗透到子组件中，-->
<!--然而子组件的根节点元素会同时被设置了scoped的父css样式和设置了scoped的子css样式影响，-->
<style scoped lang="scss">
	.mission {

		width: 100%;
		height: 100%;
		background: linear-gradient(#F1EFFFFF 0%, #FFFFFF 40%, #F7F8FA 100%);
		padding-top: $nav-top-height;

		&-banner {
			width: 686rpx;
			height: 322rpx;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			position: relative;
			padding: 32rpx;
			font-size: 28rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			color: #FFFCE5;
			margin: 32rpx;

			&-bg {
				position: absolute;
				top: 0;
				left: 0;
			}

			&-header {
				position: absolute;
				width: calc(100% - 64rpx);
			}

			&-main {

				position: absolute;
				width: calc(100% - 64rpx);
				top: 92rpx;

				&-num {
					font-size: 48rpx;
					font-family: DINPro-Bold, DINPro;
					font-weight: bold;
					color: #FFF7B3;
				}

				&-flex {
					margin-top: 32rpx;
					justify-content: center;

					&-item {
						text-align: center;
						width: 33%;

						&-title {}

						&-value {}
					}
				}
			}
		}

		&-use {
			padding: 32rpx;

			image {
				width: 76rpx;
				height: 76rpx;
			}

			&-title {
				font-size: 28rpx;
				font-family: PingFang SC-Bold, PingFang SC;
				font-weight: bold;
				color: #2E3033;
				margin-bottom: 40rpx;
			}

			&-main {
				font-size: 24rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #2E3033;

				&-item {
					text-align: center;
					flex: 1;
				}
			}
		}

		&-candy {
			height: 148rpx;
			padding: 32rpx;
			margin-bottom: 64rpx;

			&-bg {
				position: absolute;
			}

			&-main {
				position: absolute;
				width: calc(100% - 64rpx);
				padding: 32rpx;

				&-left {
					&-title {
						font-size: 32rpx;
						font-family: YouSheBiaoTiHei-Regular, YouSheBiaoTiHei;
						font-weight: 400;
						color: #FFF7B3;
					}

					&-dsc {
						font-size: 24rpx;
						font-family: PingFang SC-Medium, PingFang SC;
						margin-top: 12rpx;
						color: #FFFCE5;
					}
				}

				&-right {
					&-btn {
						width: 160rpx;
						height: 56rpx;
						background: #FFF7B3;
						border-radius: 34rpx;
						font-size: 24rpx;
						font-family: PingFang SC-Bold, PingFang SC;
						font-weight: bold;
						color: #31303E;
						line-height: 56rpx;
						text-align: center;
					}
				}
			}
		}

		&-sign {
			margin: 0 32rpx;
			padding: 32rpx 20rpx;

			&-title {
				font-size: 28rpx;
				font-family: PingFang SC-Bold, PingFang SC;
				font-weight: bold;
				color: #2E3033;
			}

			&-header {
				margin-top: 32rpx;
				padding: 32rpx 0rpx;

				&-left {
					width: 84rpx;

					image {
						height: 84rpx;
						width: 84rpx;
					}
				}

				&-main {
					margin: 0 12rpx;
					flex: 1;
				}

				&-right {
					width: 120rpx;

					.public-btn {
						width: 120rpx;
						height: 56rpx;
						line-height: 56rpx;
					}
				}
			}

			&-main {
				&-item {
					text-align: center;
					width: 84rpx;

					margin-right: 8rpx;

					&-top {
						width: 84rpx;
						height: 100rpx;
						background: #F8F9FE;
						line-height: 100rpx;
						border-radius: 8rpx 8rpx 8rpx 8rpx;

						image {
							width: 84rpx;
							height: 100rpx;
						}
					}

					&-down {
						font-size: 20rpx;
						font-family: PingFang SC-Medium, PingFang SC;
						font-weight: 500;
						color: #4D4136;


					}
				}
			}
		}

		&-main {
			margin: 0 32rpx;

			&-box {
				padding: 32rpx;
				margin: 32rpx 0;
			}
		}

	}
</style>
